{% extends "base.html" %}

{% block content %}
<h2>Praktyka studenta{% if user.teacher %}: {{ training.student }}{% endif %}</h2>
<table>
    <tr><td>Firma</td> <td>{% firstof training.branch "(brak)" %}</td></tr>
{% if training.branch %}
	<tr><td>Ubezpieczyciel</td> <td>{{ training.insurance_company }}</td></tr>
	<tr><td>Polisa</td> <td>{{ training.insurance_number }}</td></tr>
	<tr><td>Płatna</td> <td>{% if training.payable %} tak {% else %} nie {% endif %}</td></tr>
	<tr><td>Akademik</td> <td>{% if training.hostel %} tak {% else %} nie {% endif %}</td></tr>
	<tr><td>Zagraniczna</td> <td>{% if training.abroad %} tak {% else %} nie {% endif %}</td></tr>
	<tr><td>Praca zawodowa</td> <td>{% if training.is_working %} tak {% else %} nie {% endif %}</td></tr>
	<tr><td>Socrates</td> <td>{% if training.socrates %} tak {% else %} nie {% endif %}</td></tr>
{% endif %}
    <tr><td>Adres studenta</td> <td>{% firstof training.street "(brak)" %}</td></tr>
    <tr><td>Miasto</td> <td>{% firstof training.city "(brak)" %}</td></tr>
    <tr><td>Kod pocztowy</td> <td>{% firstof training.postal_code "(brak)" %}</td></tr>
    <tr><td>Student zagraniczny</td> <td>{% if training.is_foreigner %} tak {% else %} nie {% endif %}</td></tr>
    <tr><td>Firma</td> <td>{% firstof training.branch "(brak)" %}</td></tr>
    
</table>
{% if user.get_profile.student and not training.locked %}
<a href="/my_trainings/edit/{{ training.id }}/">Edytuj</a> |
{% endif %}
{% if user.get_profile.teacher %}
<a href="/trainings/edit/{{ training.id }}/">Edytuj</a> |
{% if training.locked %}
<a href="/trainings/unlock/{{ training.id }}/">Odblokuj</a> |
{% else %}
<a href="/trainings/lock/{{ training.id }}/">Zablokuj</a> |
{% endif %}
{% endif %}
<a href="{{ return_url }}">Wróc</a>
{% endblock %}

